﻿using System;
using System.Collections.Generic;

namespace DataManageSystem.Models.LimsModels;

public partial class TRegisterStateKey
{
    /// <summary>
    /// 主键
    /// </summary>
    public string Guid { get; set; } = null!;

    /// <summary>
    /// register 的code
    /// </summary>
    public string? RegisterCode { get; set; }

    /// <summary>
    /// 最小单位（包括bit）
    /// </summary>
    public string? StateName { get; set; }

    /// <summary>
    /// 如为读取 时的写入对应state_key的guid
    /// </summary>
    public string? WriteState { get; set; }

    /// <summary>
    /// 绑定的状态代码
    /// </summary>
    public string? StateGuid { get; set; }

    /// <summary>
    ///  0只写 1只读 2读写
    /// </summary>
    public int? ReadType { get; set; }

    /// <summary>
    /// 状态地址
    /// </summary>
    public string? StateKey { get; set; }

    /// <summary>
    /// 使用cron 表达式
    /// </summary>
    public string? IsLazy { get; set; }

    /// <summary>
    /// 默认定时器
    /// </summary>
    public string? IsInterval { get; set; }

    /// <summary>
    /// 定时器时间
    /// </summary>
    public int? ScanIntervalMs { get; set; }

    public DateTime? CreateTime { get; set; }

    public string? CreateBy { get; set; }

    public DateTime? UpdateTime { get; set; }

    public string? UpdateBy { get; set; }

    /// <summary>
    /// 整个key代表的含义 DB0代表 比如一组开关的显示值
    /// 
    /// </summary>
    public bool? IsDelete { get; set; }

    /// <summary>
    /// 数据类型 分为&quot;整型&quot;, 
    /// &quot;双整型&quot;
    /// &quot;布尔型&quot;,
    /// &quot;双浮点型&quot;,
    /// &quot;浮点型&quot;,
    /// &quot;位&quot;, 
    /// </summary>
    public string? ValueType { get; set; }

    public int? BitKey { get; set; }

    /// <summary>
    /// 整个key代表的含义 DB0代表 比如一组开关的显示值
    /// </summary>
    public string? KeyName { get; set; }

    /// <summary>
    /// 数据范围 比如0-10
    /// </summary>
    public string? ValueRange { get; set; }

    /// <summary>
    /// 输入类型 目前为input,select
    /// </summary>
    public string? InputType { get; set; }

    /// <summary>
    /// 算完公式后的内容填充常用于单位 ${val}℃
    /// </summary>
    public string? TextFill { get; set; }

    /// <summary>
    /// 公式用于得到显示值以及减少小数点 (${val}/10)-((${val}/10)%0.1)
    /// </summary>
    public string? Formula { get; set; }

    /// <summary>
    /// 从前端输入时的公式计算
    /// </summary>
    public string? InputFormula { get; set; }

    /// <summary>
    /// 是否为复合型数据
    /// </summary>
    public bool? Composable { get; set; }

    /// <summary>
    /// 是否需要日志记录
    /// </summary>
    public bool? IsMain { get; set; }

    /// <summary>
    /// 废弃
    /// </summary>
    public string? Room { get; set; }

    /// <summary>
    /// 废弃
    /// </summary>
    public string? DeviceName { get; set; }

    /// <summary>
    /// 展示时排序
    /// </summary>
    public string? ShowOrder { get; set; }

    /// <summary>
    /// 报警等级1设备报警 2消防报警
    /// </summary>
    public int? WarningLevel { get; set; }

    /// <summary>
    /// 到达这个值时触发报警
    /// </summary>
    public int? WarningValue { get; set; }

    /// <summary>
    /// 脉冲信号（写）
    /// </summary>
    public bool? IsPulse { get; set; }

    /// <summary>
    /// 是否显示在前端 其实没有用了现在
    /// </summary>
    public int? IsShow { get; set; }

    /// <summary>
    /// 步进步退值
    /// </summary>
    public string? Step { get; set; }

    /// <summary>
    /// 报警值范围 布尔表达式
    /// </summary>
    public string? WarningRange { get; set; }

    /// <summary>
    /// ${addMs}日志频率,阈值日志 ${val}
    /// </summary>
    public string? LogRate { get; set; }
}
